<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>接种点查询 - 疫苗预约系统</title>
    <link rel="stylesheet" href="../css/common.css?v=20251119">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
    <div class="main-container">
        <!-- 侧边栏 -->
        <div class="sidebar">
            <div class="sidebar-header">
                <i class="fas fa-syringe"></i>
                <h2>疫苗预约系统</h2>
                <p>普通用户</p>
            </div>
            <nav class="sidebar-menu">
                <a href="home.html" class="menu-item">
                    <i class="fas fa-home"></i>
                    <span>首页</span>
                </a>
                <a href="family.html" class="menu-item">
                    <i class="fas fa-users"></i>
                    <span>家属管理</span>
                </a>
                <a href="appointment.html" class="menu-item">
                    <i class="fas fa-calendar-check"></i>
                    <span>预约管理</span>
                </a>
                <a href="vaccine.html" class="menu-item">
                    <i class="fas fa-vial"></i>
                    <span>疫苗查询</span>
                </a>
                <a href="site.html" class="menu-item active">
                    <i class="fas fa-hospital"></i>
                    <span>接种点查询</span>
                </a>
                <a href="profile.html" class="menu-item">
                    <i class="fas fa-user-circle"></i>
                    <span>个人中心</span>
                </a>
            </nav>
        </div>

        <!-- 主内容区域 -->
        <div class="main-content">
            <!-- 顶部导航栏 -->
            <div class="top-navbar">
                <div class="navbar-left">
                    <h1>接种点查询</h1>
                </div>
                <div class="navbar-right">
                    <div class="user-info">
                        <div class="user-avatar" id="userAvatar">U</div>
                        <span class="user-name" id="userName">用户</span>
                    </div>
                    <button class="btn-logout" onclick="handleLogout()">
                        <i class="fas fa-sign-out-alt"></i> 退出登录
                    </button>
                </div>
            </div>

            <!-- 内容区域 -->
            <div class="content-area">
                <!-- 页面标题 -->
                <div class="page-header">
                    <h2 class="page-title">接种点查询</h2>
                    <p class="page-subtitle">查看所有疫苗接种点信息</p>
                </div>

                <!-- 搜索条件 -->
                <div class="card">
                    <div class="card-body">
                        <div class="form-row">
                            <div class="form-group">
                                <label>接种点名称</label>
                                <input type="text" id="siteNameFilter" placeholder="输入接种点名称搜索">
                            </div>
                            <div class="form-group">
                                <label>地址</label>
                                <input type="text" id="siteAddressFilter" placeholder="输入地址搜索">
                            </div>
                            <div class="form-group" style="display: flex; align-items: flex-end;">
                                <button class="btn btn-primary" onclick="loadSiteList()">
                                    <i class="fas fa-search"></i> 搜索
                                </button>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 接种点列表 -->
                <div class="card">
                    <div class="card-header">
                        <h3 class="card-title">接种点列表</h3>
                    </div>
                    <div class="card-body">
                        <div id="siteGrid" class="site-grid">
                            <!-- 接种点卡片将在这里动态生成 -->
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <style>
        .site-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
            margin-top: 20px;
        }

        .site-card {
            background: white;
            border: 1px solid #e0e0e0;
            border-radius: 8px;
            padding: 20px;
            transition: all 0.3s ease;
        }

        .site-card:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            transform: translateY(-2px);
        }

        .site-card-header {
            display: flex;
            align-items: flex-start;
            margin-bottom: 15px;
        }

        .site-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            margin-right: 15px;
            flex-shrink: 0;
        }

        .site-title {
            flex: 1;
        }

        .site-title h4 {
            margin: 0 0 5px 0;
            font-size: 18px;
            color: #333;
        }

        .site-title p {
            margin: 0;
            font-size: 14px;
            color: #999;
        }

        .site-info {
            margin-top: 15px;
        }

        .site-info-item {
            display: flex;
            align-items: flex-start;
            padding: 8px 0;
            border-bottom: 1px solid #f0f0f0;
        }

        .site-info-item:last-child {
            border-bottom: none;
        }

        .site-info-icon {
            width: 20px;
            color: #666;
            margin-right: 10px;
            margin-top: 2px;
        }

        .site-info-content {
            flex: 1;
        }

        .site-info-label {
            color: #666;
            font-size: 12px;
            margin-bottom: 2px;
        }

        .site-info-value {
            color: #333;
            font-size: 14px;
        }

        .site-actions {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #f0f0f0;
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }

        .empty-state i {
            font-size: 64px;
            margin-bottom: 20px;
            display: block;
            color: #ddd;
        }
    </style>

    <script src="../js/common.js"></script>
    <script src="js/site.js"></script>
</body>
</html>

